﻿function StreetClick() {
    var inputs = document.getElementById("AreaList").getElementsByTagName("input");
    var value = "";
    for (var i = 0; i < inputs.length; i++) {
        if (inputs[i].type == "checkbox" && inputs[i].checked) {
            value += inputs[i].value + ",";
        }
    }
    document.getElementById("hdf_AreaAuthority").value = value;
    document.getElementById("test").innerHTML = value;
}

function AreaClick(index,checked) {

    var inputs = document.getElementById("ul_street_"+index).getElementsByTagName("input");
   
    for (var i = 0; i < inputs.length; i++) {
        if (inputs[i].type == "checkbox") {
            inputs[i].checked = checked;            
        }
    }

    StreetClick();
}